cmake_minimum_required(VERSION 3.20)

#xxxxxxxxxxxxxxxxxxx 添加Conan生成的 toolchain file
# set(CMAKE_TOOLCHAIN_FILE ${CMAKE_BINARY_DIR}/conan_toolchain.cmake)

#xxxxxxxxxxxxxxxxxxx 是否使用 thirdparty 中的库
# list(PREPEND CMAKE_PREFIX_PATH "${MY_THIRD_PARTY}")

if(TRUE AND MSVC)
    set(CMAKE_CUDA_COMPILER_WORKS ON CACHE INTERNAL "" FORCE)
    # set(CMAKE_CUDA_COMPILER "C:/MyProgram/cuda/bin/nvcc.exe")
    # set(CMAKE_CUDA_COMPILER_FORCED TRUE)
endif()

#xxxxxxxxxxxxxxxxxxxxxxxxx 标出 cuda 是必须的
project(cucon LANGUAGES CXX CUDA)
#------------- 检查 cuda
# include(CheckLanguage)
# check_language(CUDA)

#------------- 标准路径配置;
include(cmake/mypath.cmake)
#------------- common settings and functions
include(cmake/mycommon.cmake)
include(cmake/myfuns.cmake)

#xxxxxxxxxxxxxxxxxxxxxxxxx find packages
include(cmake/myfind.cmake)
# set(CMAKE_CXX_INCLUDE_DIRECTORIES ${MY_COMMON_DIR})

add_subdirectory(src/common)
add_subdirectory(src/test_cuda)

##
add_subdirectory(src/runall)

# =============================== pack exe
include(cmake/install.cmake)